package com.jingdianjichi.subject.domain.convert;

import com.jingdianjichi.subject.domain.entity.SubjectAnswerBO;
import com.jingdianjichi.subject.domain.entity.SubjectInfoBO;
import com.jingdianjichi.subject.domain.entity.SubjectOptionBO;
import com.jingdianjichi.subject.infra.basic.entity.SubjectInfo;
import com.jingdianjichi.subject.infra.basic.entity.SubjectJudge;
import com.jingdianjichi.subject.infra.basic.entity.SubjectMultiple;
import com.jingdianjichi.subject.infra.basic.entity.SubjectRadio;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface SubjectInfoConverter {
    SubjectInfoConverter INSTANCE = Mappers.getMapper(SubjectInfoConverter.class);

    SubjectInfo convertBOToInfo(SubjectInfoBO subjectInfoBO);

    List<SubjectInfo> convertBOToInfo(List<SubjectInfoBO> subjectInfoBOList);

    SubjectInfoBO convertInfoToBO(SubjectInfo subjectInfo);

    List<SubjectInfoBO> convertInfoToBO(List<SubjectInfo> subjectInfoList);

    SubjectInfoBO convertInfoAndOptionToBO(SubjectInfo subjectInfo,SubjectOptionBO subjectOptionBO);

    SubjectAnswerBO convertRadioTOAnswer(SubjectRadio subjectRadio);

    List<SubjectAnswerBO> convertRadioTOAnswer(List<SubjectRadio> subjectRadioList);

    SubjectAnswerBO convertMultipleTOAnswer(SubjectMultiple subjectMultiple);

    List<SubjectAnswerBO> convertMultipleTOAnswer(List<SubjectMultiple> subjectMultipleList);

    SubjectAnswerBO convertJudgeTOAnswer(SubjectJudge subjectJudge);

    List<SubjectAnswerBO> convertJudgeTOAnswer(List<SubjectJudge> subjectJudgeList);
}
